package com.itheima.day10.myParameter.test3;

public class Demo {
    public static void main(String[] args) {
        System.out.println(getSum(1,2,3,4,5,6,7,8,9,10));
    }

    public static int getSum(int... a) {
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum += a[i];
        }
        return sum;
    }
}
